package com.kfm.pm;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

public class LocalTimeExample {

    public static void main(String[] args) {
        LocalTime localTime = LocalTime.now();
        System.out.println(localTime);

        LocalTime of = LocalTime.of(14, 23);
        System.out.println(of);
        LocalTime of2 = LocalTime.of(14, 23, 59);
        System.out.println(of2);

        LocalTime parse = LocalTime.parse("12:23:34");
        System.out.println(parse);

        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("HH mm ss");
        System.out.println(parse.format(dateTimeFormatter));
    }
}
